<template>
<div class="title">本地的todo list 代办清单</div>
<el-button type="primary" plain>创建</el-button>

  <el-table :data="list" style="width: 100%">
    <el-table-column prop="text" label="内容" width="180" />
    <el-table-column prop="time" label="时间" width="180" />
    <el-table-column label="操作" width="300">
      <el-button type="danger">删除</el-button>
      <el-button type="primary">编辑</el-button>
    </el-table-column>
  </el-table>

  <!-- 弹出框 -->
  <el-dialog v-model="dialogFormVisible" title="添加代办">
    <el-form :model="form">
      <el-form-item label="内容" :label-width="formLabelWidth">
        <el-input v-model="form.name" autocomplete="off" />
      </el-form-item>
      <el-form-item label="时间" :label-width="formLabelWidth">
        <!-- 时间 -->
        <div class="block">
          <span class="demonstration">Use value-format</span>
          <div class="demonstration">Value：{{ value2 }}</div>
          <el-date-picker
            v-model="value2"
            type="date"
            placeholder="Pick a Date"
            format="YYYY/MM/DD"
            value-format="YYYY-MM-DD"
          />
        </div>
      </el-form-item>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogFormVisible = false">Cancel</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">
          Confirm
        </el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script>
export default {
  data () {
    return {
      dialogFormVisible:true ,
      list:[{
        time: '2016-05-03',
        text: 'Tom'
      }],
      form:({
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: '',
        })
    }
  }
}
</script>


<style scoped>
.title{
font-size: 30px;
margin-bottom: 20px;
}
</style>
